# -*- coding: UTF-8 -*-

import json
import openpyxl

wb = openpyxl.load_workbook("test_read.xlsx")
print(wb.get_sheet_names())
sheet = wb.get_sheet_by_name("Sheet1")
books_info = []
for row in range(2, sheet.max_row + 1):
    name = sheet['A' + str(row)].value
    author = sheet['B' + str(row)].value
    publisher = sheet['C' + str(row)].value
    book = {
        "name": name,
        "author": author,
        "pulisher": publisher
    }
    books_info.append(book)

print(books_info)
print(json.dumps(books_info, indent=4))
